package root;

import net.sf.extjwnl.JWNLException;
import net.sf.extjwnl.data.IndexWord;
import net.sf.extjwnl.data.IndexWordSet;
import net.sf.extjwnl.dictionary.Dictionary;

import java.util.Scanner;

public class Main {
  public static void main(String[] args) throws JWNLException {
    Dictionary dic = Dictionary.getFileBackedInstance("data");
    String query = new Scanner(System.in).nextLine();
    long combinations = 1;
    for (String word_str : query.split(" ")) {
      IndexWordSet indexWordSet = dic.lookupAllIndexWords(word_str);
      int cperword = 0;
      for (IndexWord word : indexWordSet.getIndexWordArray()) {
        System.out.println(word.getLemma() + " " + word.getPOS() + " " + word.getSenses().size());
        cperword += word.getSenses().size();
      }
      if (cperword > 0) combinations *= cperword;
    }
    System.out.println(combinations);
  }
}
